import request from '@/plugins/axios'

export function fetchList(query) {
  return request({
    url: '/api/budgetinitiate/page',
    method: 'get',
    params: query
  })
}

export function fetchList2(query) {
    return request({
        url: '/api/budgetinitiate/page2',
        method: 'get',
        params: query
    })
}

export function addObj(obj) {
  return request({
    url: '/api/budgetinitiate',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/api/budgetinitiate/' + id,
    method: 'get'
  })
}


export function judgeInitiate() {
    return request({
        url: '/api/budgetinitiate/judgeInitiate',
        method: 'get'
    })
}


export function getInitObj() {
    return request({
        url: '/api/budgetinitiate/budgetInit',
        method: 'get'
    })
}

export function getInitObj2() {
    return request({
        url: '/api/budgetinitiate/budgetInit2',
        method: 'get'
    })
}

export function delObj(id) {
  return request({
    url: '/api/budgetinitiate/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/api/budgetinitiate',
    method: 'put',
    data: obj
  })
}


export function summaryView(val) {
    return request({
        url: '/api/budgetparameter/summary/view?budgetCode='+val,
        method: 'get',
    })
}

